/**
 *Copyright (c) 2024 watereyes
 * workflow is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.workflow.api.bean;

import com.koron.workflow.common.bean.BaseBean;
import com.koron.workflow.common.util.WorkflowUtil;

/**
 * 任务节点定时信息
 * @author bin
 *
 */
public class TimerBean extends BaseBean{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 任务节点ID
	 */
	private String taskId;
	
	/**
	 * 状态 0未处理 1已处理
	 */
	private Integer status;
	
	/**
	 * 延迟时间 
	 */
	private Integer delay;
	
	/**
	 * 处理方式 
	 * 1处理人为空跳过 2身份重复跳过 4催办处理人 8自动跳过 16通知节点处理
	 */
	private Integer type;
	
	/**
	 * 通知方式
	 * 1推送 2 邮件 4 短信
	 */
	private Integer flag;
	
	public TimerBean() {}
	
	public TimerBean(String taskId, Integer status, Integer delay, Integer type) {
		this.taskId = taskId;
		this.status = status;
		this.delay = delay;
		this.type = type;
		this.setId(WorkflowUtil.getObjectId());
	}

	public String getTaskId() {
		return taskId;
	}

	public Integer getDelay() {
		return delay;
	}

	public Integer getType() {
		return type;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public void setDelay(Integer delay) {
		this.delay = delay;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "TimerBean [taskId=" + taskId + ", status=" + status + ", delay=" + delay + ", type=" + type + "]";
	}
}
